/*================================================================
*   文件名称：main.cpp
*   创 建 者：yang qiang
*   创建日期：2021年02月21日
*   描    述：
*   Copyright (C) 2021 All rights reserved.
*
* ================================================================*/


#include <iostream>

using namespace std;

class Solution {
public:
    int Fibonacci(int n) {
        if(n == 0)
            return 0;

        int first = 1, second = 1;
        int cur = 1;
        for(int i = 3; i <= n; i++){
            cur = first + second;
            first = second;
            second = cur;
        }

        return cur;
    }
};
